////////////////////////////////////////////////////////
//
//
//	Name: Tonality 
//	Function: Test Tonality feature extraction
//	Author: Li Ming
//	Created: 2010-10-29
//
//
////////////////////////////////////////////////////////

#include <stdio.h>
#include "Tonality.h"

#define	AudioFile	"G:/Temp/Beethoven.wav" //NewStories.wav"

void main(int argc,char * argv[])
{
	Tonality	tonality;
	int		bin;
	bool	ret;
	ToneInfo	info;

	ret = tonality.GetAudioTonality(AudioFile, &info);
	if (ret==false)
	{
		printf("Failed to process %s!\n", AudioFile);
		return;
	}
	printf("Major tonality = %5.3f\n", info.major);
	printf("Minor tonality = %5.3f\n", info.minor);
	printf("Shift = %d\n", info.shift);
	for (bin = 0; bin < HPCPDim; bin++)
	{
		printf("[%d] %5.3f\n", bin, info.THPCP[bin]);
	}
}